<#macro dataGrid id="dataGrid" dg="">
<table id="${id}"></table>
	<script type="text/javascript">
	$(function() {
		$('${'#'+id}').datagrid({
				title:'${dg.title}',
	            height:'${dg.height}', //高度 
	            pageSize: ${dg.pageSize},//每页显示的记录条数，默认为10 
	            pageList: ${dg.pageListStr},//可以设置每页记录条数的列表
				collapsible:${dg.collapsible?c},
				iconCls:'${dg.iconCls}',
				fitColumns:${dg.fitColumns?c},
				resizeHandle:'${dg.resizeHandle}',
				rownumbers:${dg.rownumbers?c},
				pagination:${dg.pagination?c},
				loadMsg:'${dg.loadMsg}',
			    url:'${dg.url}',
			    fit: true,
			    columns:[[
			    	<#list dg.columns as column>
			    		${"{field:'"+column.field+"',title:'"+column.title+"'}"}<#if column_has_next>,</#if>
			    	</#list>
			    ]]
			});
		$('${'#'+id}').datagrid('getPager').pagination({ 
		     beforePageText: '第',//页数文本框前显示的汉字  
	         afterPageText: '页    共 {pages} 页',  
	         displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录', 
		});
	});
	</script>
</#macro>